package com.lp.common.poster.entity;

import com.lp.common.poster.annotation.PosterBackground;
import com.lp.common.poster.annotation.PosterFontCss;
import com.lp.common.poster.annotation.PosterImageCss;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.awt.*;
import java.awt.image.BufferedImage;

import static com.lp.common.poster.PosterService.GRADUATION_CODE;

/**
 * @program: biz
 * @description: 结营证书
 * @author: Ke.Song
 * @since: 2024-06-15 16:30:55
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class GraduationPoster extends BasePoster {

    private static final int MULTIPLE = 2;

    /**
     * 背景图
     */
    @PosterBackground(width = 343 * MULTIPLE, height = 384 * MULTIPLE)
    private BufferedImage backgroundImage;

    /**
     * 头像
     */
    @PosterImageCss(position = {43 * MULTIPLE, 196 * MULTIPLE}, width = 40 * MULTIPLE, height = 40 * MULTIPLE, circle = true)
    private BufferedImage headImage;

    /**
     * 昵称
     */
    @PosterFontCss(position = {93 * MULTIPLE, 207 * MULTIPLE}, color = {0, 80, 171}, style = Font.BOLD, size = 18 * MULTIPLE)
    private String nickName;

    /**
     * 内容
     */
    @PosterFontCss(position = {48 * MULTIPLE, 245 * MULTIPLE}, color = {0, 80, 171}, canNewLine = {1, 240 * MULTIPLE, 3}, size = 14 * MULTIPLE,
            type = GRADUATION_CODE)
    private String content;

    /**
     * 内容
     */
    @PosterFontCss(position = {48 * MULTIPLE, 287 * MULTIPLE}, color = {0, 80, 171}, canNewLine = {1, 240 * MULTIPLE, 3}, size = 14 * MULTIPLE,
            type = GRADUATION_CODE)
    private String subtitle;
}
